﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Hospital.Model;
using System.Data;

namespace Hospital.BLL.IBLL
{
    public interface IUserService
    {
        /// <summary>
        /// Find all users
        /// </summary>
        /// <returns></returns>
        IList<User> GetAllUsers();

        /// <summary>
        /// Save user information
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        bool UpdateUser(User user);

        /// <summary>
        /// Delete user
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        bool DeleteUser(User user);

        /// <summary>
        /// add a new user
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        bool AddUser(User user);

        /// <summary>
        /// Add or update user
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        bool UpdateOrAddUser(User user);

        /// <summary>
        /// Find a user by id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        User GetUserById(int id);

        /// <summary>
        /// Get all User
        /// </summary>
        /// <returns></returns>
        DataTable GetAllUser();

        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="strUserName"></param>
        /// <param name="strPassword"></param>
        /// <returns></returns>
        User UserLogin(string strUserName, string strPassword);
    }
}
